﻿#pragma once
#include <stdint.h>

//-------------------------------------------------------------------------------
//	最大player数量
#if defined (_MSC_VER)
static const uint16_t slot_max_count = 12;
static const uint32_t player_max_count = 1024;
static const uint32_t default_map_count = 64;
#else
static const uint16_t slot_max_count = 12;
static const uint32_t player_max_count = 4096;
static const uint32_t default_map_count = 128;
#endif

static const uint32_t map_max_count = default_map_count;// + pvp_map_count;

static const uint32_t account_start_id = 10000;

// ==============================================================================
//  nbgSrv:全局常量定义
// ------------------------------------------------------------------------------

// ------------------------------------------------------------------------------
//	排行榜类型
// ------------------------------------------------------------------------------
static const uint32_t ranklist_type_allfc = 0;
static const uint32_t ranklist_type_allstars = 1;
static const uint32_t ranklist_type_diamondcost = 2;
static const uint32_t ranklist_type_F4 = 3;	//最强四人排行榜
static const uint32_t ranklist_type_goldcost = 4;
static const uint32_t ranklist_type_level = 5;
static const uint32_t ranklist_type_IvI = 6;	//竞技场排行榜(实时)
static const uint32_t ranklist_type_yesterdayIvI = 7;

const uint32_t best_heros_count = 4;	//最强英雄数量

// ------------------------------------------------------------------------------
//	任务类型
static const uint32_t e_mission_type_main = 0;//主线
static const uint32_t e_mission_type_branch = 1;//支线
static const uint32_t e_mission_type_reward = 2;//悬赏

// ------------------------------------------------------------------------------
//	主线任务类型
static const uint32_t main_mission_type_1 = 1;//对话；
static const uint32_t main_mission_type_2 = 2;//通关副本；
static const uint32_t main_mission_type_3 = 3;//采集；
static const uint32_t main_mission_type_4 = 4;//提升技能等级；
static const uint32_t main_mission_type_5 = 5;//提升英雄装备等级；
static const uint32_t main_mission_type_6 = 6;//杀怪；
static const uint32_t main_mission_type_7 = 7;//怪物掉落物；
static const uint32_t main_mission_type_8 = 8;//背包物品；
static const uint32_t main_mission_type_9 = 9;//指定地点, 即完成NPC附近使用道具；
static const uint32_t main_mission_type_10 = 10;//击杀临时怪物

// ------------------------------------------------------------------------------
//	场景元素类型
static const uint32_t scene_element_type_1 = 1;//怪物 = monsterAttr
static const uint32_t scene_element_type_2 = 2;//NPC = npc
static const uint32_t scene_element_type_3 = 3;//传送点 = TransferTable
static const uint32_t scene_element_type_4 = 4;//复活点
static const uint32_t scene_element_type_5 = 5;//藏宝点
static const uint32_t scene_element_type_6 = 6;//天灾降临随机点
static const uint32_t scene_element_type_7 = 7;//采集物 = Collect

// ------------------------------------------------------------------------------
//	运行时数据的类型定义
// ------------------------------------------------------------------------------
static const uint32_t ranklist_count = 1;	//标记运行时排行榜配置个数

static const uint32_t name_size = 32;		//姓名长度

static const uint32_t vit_minite_count = 5;	//体力恢复时间间隔分钟数

// ------------------------------------------------------------------------------
//	int 32位掩码定义
// ------------------------------------------------------------------------------
static uint32_t const int32_mask[33] = {
	0x0,
	0x01,			0x03,			0x07,			0x0F,
	0x1F,			0x3F,			0x7F,			0xFF,
	0x01FF,			0x03FF,			0x07FF,			0x0FFF,
	0x1FFF,			0x3FFF,			0x7FFF,			0xFFFF,
	0x01FFFF,		0x03FFFF,		0x07FFFF,		0x0FFFFF,
	0x1FFFFF,		0x3FFFFF,		0x7FFFFF,		0xFFFFFF,
	0x01FFFFFF,		0x03FFFFFF,		0x07FFFFFF,		0x0FFFFFFF,
	0x1FFFFFFF,		0x3FFFFFFF,		0x7FFFFFFF,		0xFFFFFFFF,
};

// ------------------------------------------------------------------------------
//	int 32位标识位定义
// ------------------------------------------------------------------------------
static uint32_t const int32_flag[33] = {
	0x0,
	0x1,			0x2,			0x4,			0x8,
	0x10,			0x20,			0x40,			0x80,
	0x100,			0x200,			0x400,			0x800,
	0x1000,			0x2000,			0x4000,			0x8000,
	0x10000,		0x20000,		0x40000,		0x80000,
	0x100000,		0x200000,		0x400000,		0x800000,
	0x1000000,		0x2000000,		0x4000000,		0x8000000,
	0x10000000,		0x20000000,		0x40000000,		0x80000000,
};

// ------------------------------------------------------------------------------
//	服务器间心跳间隔
// ------------------------------------------------------------------------------
static const uint32_t server_heart_time = 60000;	// 1分钟1次
static const uint32_t server_heart_overtime = 300000;	// 超时时间 5分钟
static const uint32_t server_status_gettime = 600000;	// 检查服务器状态时间间隔 10分钟检测1次